package com.tubang.common.entity;


import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.fasterxml.jackson.annotation.JsonFormat;

@SuppressWarnings({ "serial", "rawtypes" })
public class BaseEntity<T extends Model> extends Model<T> {
    /**
     * 主键ID , 注解可以无
     */
//    @TableId(type = IdType.ID_WORKER, value = "id")
    @TableField(value="id", fill = FieldFill.INSERT, strategy = FieldStrategy.NOT_EMPTY)
    private String id;
    /**
     * 创建时间
     */
	@TableField(value="create_time", fill = FieldFill.INSERT, strategy = FieldStrategy.NOT_EMPTY)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
    /**
     * 更新时间
     */
//	@TableField(value = "update_time", fill = FieldFill.INSERT, strategy = FieldStrategy.NOT_EMPTY)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(value = "update_time")
	private Date updateTime;
    /**
     * 是否可用
     */
//	@TableField(value = "enable", fill = FieldFill.INSERT_UPDATE, strategy = FieldStrategy.NOT_EMPTY)
	private Boolean enable;
    
	 /**
     * 备注信息
     */
	private String remarks;
	
	@Override
    protected Serializable pkVal() {
        return this.id;
    }

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}}
